package com.wg.controller;

import com.wg.R;
import com.wg.entity.dto.FocusDto;
import com.wg.service.FocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/focus")
public class FocusController {

    @Autowired
    FocusService focusService;

    /**
     * web端关注相关接口
     */

    @PostMapping
    public R addFocus(@RequestBody @Validated FocusDto focus) {
        return focusService.addFocus(focus);
    }

    @DeleteMapping
    public R deleteFocus(@RequestBody @Validated FocusDto focus) {
        return focusService.deleteFocus(focus);
    }
}
